package com.sky.mapper;/**
 * @Package: com.sky.mapper
 * @ClassName: DishFlavorMapper
 * @Author: CY
 * @CreateTime: 2025/7/23 09:51
 * @Description:
 */

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *@author ChenYong
 *@time 2025/7/2309:51
 */
@Mapper
public interface DishFlavorMapper {
    public void insertBatch(List<DishFlavor> flavors);


    /*
    * 根据菜品id查询对应的口味数据
    * */
    @Delete("delete from dish_flavor where dish_id = #{dishId}")
    void deleteByDishId(Long dishId);

    void deleteByDishIds(List<Long> dishIds);

    @Select("select * from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> getByDishId(Long dishId);
}
